define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {
		function get_data_product_detail(result) {
			if(false) {
				result = '{"success":true,"msg":"","result":{"store_name":"五金一店","credit_line":"15000.00","brand_name":"博世","cat_type":[{"name":"气动元件-气抓"},{"name":"输送设备-输送传送带"}],"region":[{"name":"上海-上海"}],"change_price":"可"},"session":"7311da98bd0f18eb15a96bcb263f4153"}';
				return JSON.parse(result);
			} else
				return result;
		}

		//返回信息
		return {
			//供应商详情
			product_detail:function(store_id,callback){
				Http.post({
					method:'member.supplier.detail',
					store_id:store_id,
				},function(result){
					if(callback)
						callback(get_data_product_detail(result).result);
				},function(e){
					
				},function(){
					
				})
			}

		};
	}

	factory.$inject = ['Http'];
	return app.registerService("Distributor_sxqd_detail", factory);
});